plot_ly(instacart %>% sample_n(500),
x = ~order_hour_of_day,
y = ~days_since_prior_order,
type = "scatter",
mode = "markers")
instacart %>%
count(aisle, sort = TRUE) %>%
head(10) %>%
plot_ly(x = ~aisle, y = ~n, type = "bar") %>%
layout(xaxis = list(title = "Aisle"), yaxis = list(title = "Count"))
instacart %>%
filter(aisle %in% c("fresh vegetables", "fresh fruits")) %>%
plot_ly(x = ~aisle, y = ~order_hour_of_day, type = "box")